using Brouteforce.NewManagers;
using Brouteforce.Screens.PlayingScreen.Panels;
using Brouteforce.UserInterface.Abstracts;
using Brouteforce.UserInterface.Interfaces;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;

namespace Brouteforce.Screens.PlayingScreen {
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class PlayingScreen : AbstractScreen {
        public PlayingScreen()
            : base("PlayingScreen", false, BFGame.Instance.GraphicsDevice.Viewport.Bounds) {
            AbstractPanel characterStatusPanel = new CharacterStatusPanel();
            AbstractPanel gamePanel = new GamePanel();
            AbstractPanel playerStatusPanel = new PlayerStatusPanel(true);
            //characterStatusPanel.AfterLayout();
            //gamePanel.AfterLayout();
            //playerStatusPanel.AfterLayout();
            AddPanel(gamePanel, PanelLocation.Center, -1);
            AddPanel(characterStatusPanel, PanelLocation.Right, 150);
            AddPanel(playerStatusPanel, PanelLocation.Bottom, 150);
            characterStatusPanel.Bounds.Height -= 150;
            }


        public void Update(GameTime gameTime) {
            foreach (AbstractPanel panel in Panels) {
                if (InputManager.Instance.IsMouseClickedOn(panel.Bounds)) {
                    panel.Update(gameTime);
                }
            }
        }

       



    }
}
